package com.guohao;

import com.guohao.annotation.Controller;
import com.guohao.annotation.RequestMapping;
import com.guohao.http.RequestMethod;
import java.util.HashMap;
import java.util.Map;

@Controller(value = "/test")
public class Http1 {

  @RequestMapping(method = RequestMethod.GET)
  public Map<String, String> test1() {
    System.out.print(Thread.currentThread().getName());
    HashMap<String, String> objectObjectHashMap = new HashMap<>();
    objectObjectHashMap.put("test", "测试");
    return objectObjectHashMap;
  }

  @RequestMapping(value = "/b", method = RequestMethod.GET)
  public TestParam test2(TestParam testParam) {
    System.out.print(Thread.currentThread().getName());
    return testParam;
  }
  @RequestMapping(value = "/b", method = RequestMethod.POST)
  public TestParam test3(TestParam testParam) {
    System.out.print(Thread.currentThread().getName());
    return testParam;
  }

}
